package com.cloud.service.sys.impl;

import com.cloud.domain.sys.SecretKey;
import com.cloud.mapper.sys.SecretKeyMapper;
import com.cloud.service.sys.SecretKeyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liuyuan
 * @since 2019-10-21
 */
@Service
public class SecretKeyServiceImpl extends ServiceImpl<SecretKeyMapper, SecretKey> implements SecretKeyService {
    @Autowired
    SecretKeyMapper secretKeyMapper;

    @Override
    public List<SecretKey> getBySecretKey(String accessToken) {
        HashMap<String, Object> queryMap = new HashMap<>();
        queryMap.put("sys_token",accessToken);
        queryMap.put("status","ACTIVE");
        return secretKeyMapper.selectByMap(queryMap);
    }
}
